package net.imagine.backend.mockrmi.util;

/**
 * 静态配置信息
 * 
 * @author wuqh
 */
public class Constants {
	/*
	 * -----------------------------------客户端配置信息开始-------------------------
	 */
	/** 链接超时时间(ms) */
	public static final long CLIENT_CONN_TIMEOUT_MILLIS = 30000L;
//	/** 链接等待时间(ms) */
//	public static final long CLIENT_CONN_AWAIT_TIMEOUT_MILLIS = 30000L;
	/** 空闲时间(s) */
	public static final int CLIENT_IDLE_SECONDS = 10;
	/** 解码器名 */
	public static final String CLIENT_CODEC_FILTER_ID = "codec";
	/** 处理线程数 */
	public static final int CLIENT_PROCESSOR_COUNT = (Runtime.getRuntime().availableProcessors() * 2);
	/** 写超时时间(ms) */
	public static final long CLIENT_WRITE_TIMEOUT = 10000L;
	/** 读超时时间(ms) */
	public static final long CLIENT_READ_TIMEOUT = 10000L;
	/** 重试次数(ms) */
	public static final int CLIENT_RETRY_TIMES = 3;
	/** 重试等待时间(ms) */
	public static final long CLIENT_RETRY_DEALY = 300L;
	/** 缓冲区大小 */
	public static final int CLIENT_READ_BUFFER_SIZE = 4096;
	/** Socket的receiveBufferSize */
	public static final int CLIENT_RECEIVE_BUFFER_SIZE = 4096;
	/** Socket的senderBufferSize */
	public static final int CLIENT_SEND_BUFFER_SIZE = 4096;
	/** Socket的keepAlive */
	public static final boolean CLIENT_KEEP_ALIVE = false;
	/*
	 * -----------------------------------客户端配置信息结束---------------------------
	 */

	/*
	 * -----------------------------------服务端配置信息开始---------------------------
	 */
	/** 缓冲区大小 */
	public static final int SERVER_READ_BUFFER_SIZE = 4096;
	/** 空闲时间(s) */
	public static final int SERVER_IDLE_SECONDS = 10;
	/** 解码器名 */
	public static final String SERVER_CODEC_FILTER_ID = "codec";
	/** 处理线程数 */
	public static final int SERVER_PROCESSOR_COUNT = (Runtime.getRuntime().availableProcessors() * 2);
	/** Socket的receiveBufferSize */
	public static final int SERVER_RECEIVE_BUFFER_SIZE = 4096;
	/** Socket的senderBufferSize */
	public static final int SERVER_SEND_BUFFER_SIZE = 4096;
	/** Socket的keepAlive */
	public static final boolean SERVER_KEEP_ALIVE = false;
	/*
	 * -----------------------------------服务端配置信息开始---------------------------
	 */
	/** 估计的对象大小 */
	public static final int OBJECT_ESTIMATE_LEN = 1024;
	/** 对象大小上限 */
	public static final int OBJECT_MAX_LEN = Integer.MAX_VALUE;
}
